
package com.msh.automatic.android.api.util;

import lombok.AllArgsConstructor;
import lombok.Data;

public class RetUtil {
    @Data
    @AllArgsConstructor
    public static class Ret{
        String code;
        String message;
        Object body;
    }

    public static Ret success(Object body){
        return new Ret("SUCCESS","",body);
    }
    public static Ret success(){
        return success(null);
    }
    public static Ret error(String code,String message){
        return new Ret(code,message,null);
    }
    public static Ret error(String message){
        return new Ret("ERROR",message,null);
    }
}
